// atmega64a+LCD19264+GT23L16U2W
// superzlc
// 20180414112525

#include <avr/io.h>
#include <util/delay.h>
#include <compat/ina90.h>
#include "util.h"
#include "lcd19264.h"
#include "GT23L16U2W.h"
#include "lcd_show_character.c"

//#include "test_lcd.c"
//#include "test_font.c"
//#include "test_adc.c"
#include "test_dht11.c"

#define SPK_ON PORTD |= _BV(0)
#define SPK_OFF PORTD &= ~_BV(0)

uint8_t font_dots_32[32];

int main(void)
{
	DDRD = 0xff;
	DDRE = 0xff; // 奇怪别的端口也要设置为输出。
	
	SPK_OFF;

	lcd_init();
	font_init();
	//adc_init();
	dht11_init();
	
	lcd_clear(1);
	lcd_clear(2);
	lcd_clear(3);
	
	while (1)
	{
		//lcd_test();
		//font_test();
		//adc_test();
		dht11_test();
		_delay_ms(500);
	}
	return 0;
}

